package top.yokey.shopnc.model;

import top.yokey.base.base.BaseHttpClient;
import top.yokey.base.base.BaseHttpListener;
import top.yokey.shopnc.base.BaseConstant;

@SuppressWarnings("ALL")
public class MemberInviteModel {

    private final String ACT = "member_invite";
    private static volatile MemberInviteModel instance;

    public static MemberInviteModel get() {
        if (instance == null) {
            synchronized (MemberInviteModel.class) {
                if (instance == null) {
                    instance = new MemberInviteModel();
                }
            }
        }
        return instance;
    }

    public void index(BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "index")
                .post(baseHttpListener);

    }

    public void inviteone(String page, BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "inviteone")
                .add("page", BaseConstant.PAGE)
                .add("curpage", page)
                .post(baseHttpListener);

    }

    public void invitetwo(String page, BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "invitetwo")
                .add("page", BaseConstant.PAGE)
                .add("curpage", page)
                .post(baseHttpListener);

    }

    public void invitethir(String page, BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "invitethir")
                .add("page", BaseConstant.PAGE)
                .add("curpage", page)
                .post(baseHttpListener);

    }

}
